<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp" %>

<%@include file="/pageParameter.jsp" %>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${ctxPath}/sys/sysRole/list" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						角色名称：
						<input type="text" name="name" value="${entity.name}" size="30" alt="模糊查询" />
					</td>
					<td>
						<div class="subBar">
							<ul>
								<li>
									<div class="buttonActive">
										<div class="buttonContent">
											<button type="submit">查询</button>
										</div>
									</div>
								</li>
							</ul>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</form>
</div>
<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<li>
				<shiro:hasPermission name="sys/sysRole/add">
					<a class="add" href="${ctxPath}/sys/sysRole/addUI" target="dialog" mask="true" width="550" height="300" rel="input" title="添加角色">
						<span>添加角色</span>
					</a>
				</shiro:hasPermission>
			</li>
		</ul>
	</div>

	<table class="table" targetType="navTab"  width="100%" layoutH="111">
		<thead>
			<tr>
				<th>序号</th>
				<th orderField="name" class="${pageParam.orderField eq 'name' ? pageParam.orderDirection : ''}" >角色名称</th>
				<th orderField="description" class="${pageParam.orderField eq 'description' ? pageParam.orderDirection : ''}" >描述</th>
				<th orderField="createTime" class="${pageParam.orderField eq 'createTime' ? pageParam.orderDirection : ''}" >创建时间</th>
				<th>操作</th>
				<!-- 图标列不能居中 -->
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${pageBean.recordList}" varStatus="st">
				<tr target="sid_user" rel="${item.id}">
					<td>${st.index+1}</td>
					<td>${item.name }</td>
					<td>${item.description}</td>
					<td>
						<fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
					</td>
					<td>
						<shiro:hasPermission name="sys/sysRole/assignMenu">
							<a href="${ctxPath}/sys/sysRole/assignMenuUI?roleId=${item.id}" class="btnAttach"
								title="为角色【${item.name}】分配菜单" target="dialog" mask="true" width="550" >分配菜单</a>
						</shiro:hasPermission>
						<shiro:hasPermission name="sys/sysRole/edit">
							<a href="${ctxPath}/sys/sysRole/editUI?roleId=${item.id}" class="btnEdit"
								title="修改角色【${item.name}】" target="dialog" mask="true" width="550" height="300" rel="input">修改</a>
						</shiro:hasPermission>
						<shiro:hasPermission name="sys/sysRole/delete">
							<a href="${ctxPath}/sys/sysRole/delete?roleId=${item.id}" class="btnDel"
								title="删除角色【${item.name}】" target="ajaxTodo" >删除</a>
						</shiro:hasPermission>	
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/pageBar.jsp"%>
</div>
